Chris Pollett >
Old Classes >
CS216 |
HW#4 --- last modified February 17 2019 19:41:14..Due date: May 2
Files to be submitted: Purpose: To learn about Voronoi Diagrams and Delauney Triangulation. Related Course Outcomes: The main course outcomes covered by this assignment are: (9) Implement Voronoi diagrams and Delaunay triangulations Specification: For this homework you will write a program which reads in a set of 2D points from a file and then draws either the Voronoi Diagram for those points or the Delauney Triangulation of those points. The file name should be an easily identifiable constant at the start of your program. The file format should look like: diagram_type x1, y1 x2, y2 ... Here diagram_type is either V for Voronoi diagram or D for Delauney Triangulation. The values xi,yi are the floating point coordinates of the ith point in the set of points you are using to calculate the given diagram. You should include some sample files with the assignment you turn in. After reading in the file I want you to compute a rectangle [xmin, xmax] x [ymin, ymax] based on the largest and smallest x and y values amongst the points you read in. Compute the center of this rectangle. Draw your diagram within the rectangle with the same center but of x dimension 1.5*(xmax - xmin) and y dimension 1.5*(ymax-ymin). Point Breakdown
|